package com.charge;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.LockSupport;
import java.util.concurrent.locks.ReentrantLock;

public class TestLock {
	Lock lock = new ReentrantLock();
	public void test(){
		lock.lock();
		try{
			System.out.println("");
		}finally{
			lock.unlock();
		}
	}
	public void test1(){
		synchronized(this){
			System.out.println("");
		}
	}
	public void test2(){
		LockSupport.park(); 
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		synchronized(TestLock.class){
			System.out.println("");
		}
	}

}
